<div class="fields">
  <div class="form-group">
    <%= field_set_tag template_input_header(f, @template) do  %>
      <%= text_f f, :name, :disabled => @template.locked? %>
      <%= checkbox_f f, :required, :disabled => @template.locked? %>
      <%= selectable_f f, :input_type, template_input_types_options(@template.available_input_types), {}, :class => "input_type_selector #{@template.locked? && 'without_select2'}", :disabled => @template.locked? %>
      <%= selectable_f f, :value_type, template_input_value_type_options, {}, {'data-item': f.index || f.object.id, class: "select-value-type #{@template.locked? && 'without_select2'}", onchange: "tfm.templateInputs.inputValueOnchange(this)", disabled: @template.locked? } %>
      <%= selectable_f f, :resource_type, Permission.resources_with_translations, {}, {wrapper_class: "#{hide_resource_type_input(f.object)} form-group resource-type-#{f.index || f.object.id}", class: "#{@template.locked? && 'without_select2'}", disabled: @template.locked? } %>
      <% @template.available_input_types.each do |type| %>
      <div class="<%= type %>_input_type custom_input_type_fields" style="<%= f.object.input_type == type ? '' : 'display:none' %>">
        <%= Foreman.input_types_registry.get(type).new.render_input_definition(self, f, @template) %>
      </div>
      <% end %>
      <%= textarea_f f, :description, :rows => 3, :disabled => @template.locked? %>
    <% end %>
  </div>
</div>
